package com.ll.test;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;

@Controller
public class Appcontrol {

	@RequestMapping("test")
    @ResponseBody
    public String test() {
        return "Hello World!";
    }

	@RequestMapping("test1")
	@ResponseBody
    public String test1() {
		RestTemplate resttemplate =  new RestTemplate();
		
		String result = resttemplate.getForObject("http://www.baidu.com", String.class);
        return result;
    }
	
	@RequestMapping("test2")
    public String test2() {
		
        return "app";
    }
}
